package com.hare.service.eye.api.${category};

import cn.hutool.core.bean.BeanUtil;
import com.hare.service.annotation.ApiServiceExplain;
import com.hare.service.common.service.ParentFace;
import com.hare.service.common.util.SystemConfigUtils;
import com.hare.service.config.SystemConfig;
import ${reqPath};
import ${resPath};
import com.hare.service.util.OutHttpUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
* @author: GenUtil
* @date: ${dateTime}
*/
@Slf4j
@Service
@ApiServiceExplain(price = ${price},docUrl ="${docUrl}",apiName = "${apiName}", info = "${info}")
public class ${className} implements ParentFace<${req}, ${res}> {

    static final String URL = "${openUrl}";

    /**
     * 执行这个服务接口
     * 如果成功，返回成功结果，如果接口错误，直接抛异常即可
     *
     * @param eyeDto 请求参数
     * @return 查询的真实结果，如果是失败，则直接返回异常即可
     */
    @Override
    public ${res} execute(${req} eyeDto) {
        //可直接通过工具类获取这个对象
        SystemConfig o = (SystemConfig) SystemConfigUtils.get();
        return OutHttpUtil.get(URL, BeanUtil.beanToMap(eyeDto), o, ${res}.class);
    }
}
